<?php

	/**
	 * 	
	 *
	 */
	class TimeUtil{
		
		public static function startOfMonth(){
			return strtotime(date('Y').'-'.date('m').'-1');
		}
		public static function endOfMonth(){
			return mktime(0, 0, 0, date("m")+1, 0, date("Y"))-1;
		}		
		
		public static function startOfToday(){
			return strtotime(date('Y-m-d'));
		}
		public static function endOfToday(){
			return mktime(0, 0, 0, date("m"), date("d")+1, date("Y"))-1;
		}
		
		public static function startOfLast7Days(){
			return strtotime('-7 days', strtotime(date('Y-m-d 00:00:00')));
		}
		
		public static function startOfLastMonth(){
			$last = strtotime('last month');
			return strtotime(date('Y', $last) . '-' . date('m', $last) . '-1');
		}
		
		public static function startOfYesterday(){
			return strtotime('yesterday');
		}
		public static function endOfYesterday(){
			return mktime(0, 0, 0, date("m"), date("d"), date("Y"))-1;
		}
	}